package com.yzyz.utils;

/**
 * 酒店星级
 * @author david.sun
 * @date 2010-7-17
 */
public enum Star {
	normal(1, "普通酒店"),
	three_star_designated (-3, "准三星"),
	three_star(3, "三星级"),
	four_star(4,"四星级"),
	four_star_designated(4,"准四星级"),
	five_star(5, "五星级"),
	five_star_designated(-5, "准五星级"),
	six_star(6, "六星级"),
	six_star_designated(-6, "准六星级"),
	seven_star(7, "七星级"),
	seven_star_designated(-7, "准七星级");
	
	private int type;
	public int getType() {
		return type;
	}
	public String getName() {
		return name;
	}
	private String name;
	
	Star(int type, String name) {
		this.type = type;
		this.name = name;
	}
	
	public static Star getInstance(int type){
		switch(type){
		case 3: return three_star;
		case -3: return three_star_designated;
		case 4: return four_star;
		case 64: return four_star_designated;
		case 5: return five_star;
		case -5: return five_star_designated;
		case 6: return six_star;
		case -6: return six_star_designated;
		case 7: return seven_star;
		case -7: return seven_star_designated;
		default: return normal;
		
		}
	}
	
	@Override
	public String toString(){
		return String.valueOf(this.type);
	}
}
